home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / BlueCustom.swf / scripts / frame_630 / PlaceObject2_337_214 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-26  |  1.2 KB  |  44 lines

  1. onClipEvent(enterFrame){
  2.    yit = Math.floor(Math.random() * 471) + 30;
  3.    if(this._x < -600)
  4.    {
  5.       this._x = 900;
  6.       this._y = _root.depth._y + yit;
  7.       die = 1;
  8.       this.gotoAndPlay(1);
  9.    }
  10.    if(this._x > 1000)
  11.    {
  12.       this._x = -400;
  13.       this._y = _root.depth._y + yit;
  14.       die = 1;
  15.       this.gotoAndPlay(1);
  16.    }
  17.    this._x += _global.xgo;
  18.    this._y += _global.ygo;
  19.    if(die == 1)
  20.    {
  21.       if(_root.player.eat.hitTest(this.eat))
  22.       {
  23.          die = 0;
  24.          reat = new Sound();
  25.          reat.attachSound("sfxreload");
  26.          reat.start(0,1);
  27.          this.gotoAndPlay("die");
  28.          _root.tools.powerup1.gotoAndStop(_root.tools.powerup1._currentframe + 1);
  29.          scoreworth = 50;
  30.          multiplyer = 1;
  31.          if(_root.tools.powerup1._currentframe > 10)
  32.          {
  33.             multiplyer = 2;
  34.          }
  35.          scoreity = Math.round(scoreworth * multiplyer);
  36.          _root.tools.instascore.text = "+" + scoreity;
  37.          _root.tools.instblock._alpha = 0;
  38.          _global.scoreit = _global.scoreit * 1 + scoreity;
  39.          _global.boost += scoreity / 30;
  40.          _root.tools.bar1.gotoAndStop(_global.boost + 1);
  41.       }
  42.    }
  43. }
  44.